package com.atguigu.gmall.seckill.service;

import com.atguigu.gmall.common.result.ResultCodeEnum;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.seckill.dto.SeckillOrderSubmitDto;
import com.atguigu.gmall.seckill.dto.SeckillQueueMsg;
import com.atguigu.gmall.seckill.entity.SeckillGoods;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author 34224
* @description 针对表【seckill_goods】的数据库操作Service
* @createDate 2023-11-29 09:44:22
*/
public interface SeckillGoodsService extends IService<SeckillGoods> {

    public abstract List<SeckillGoods> selectAllToDaySeckillGoods();

    public abstract void saveDataToLocalCache(List<SeckillGoods> seckillGoods);

    public abstract void saveDataToRedis(List<SeckillGoods> seckillGoods);

    public abstract List<SeckillGoods> findAllSeckillGoods();

    public abstract SeckillGoods findBySkuId(Long skuId);

    public abstract String getSeckillSkuIdStr(Long skuId);

    public abstract void queue(Long skuId, String skuIdStr);

    public abstract ResultCodeEnum checkOrder(Long skuId);

    public abstract void deduceStock(Long skuId, int i);

    public abstract OrderInfo prepareOrderInfo(SeckillQueueMsg seckillQueueMsg);

    public abstract OrderInfo findOrderInfoBySkuId(Long skuId);

    public abstract String submitOrder(SeckillOrderSubmitDto seckillOrderSubmitDto);
}
